<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateMediasTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('medias', function($table)
		{
			$table->increments('id');
			$table->morphs('object');
			$table->tinyInteger('type');
			$table->tinyInteger('main_image');
			$table->string('path', 255);
			$table->string('thumb', 255);
			$table->string('medium', 255);
			$table->string('original', 255);
			$table->string('url', 255);
            $table->string('extension');
            $table->double('file_size');
			$table->integer('order');
            $table->string('name');
            $table->text('caption');
			$table->tinyInteger('is_deleted');
			$table->timestamps();
		});
	}

	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('medias');
	}

}
